public class PC {
    private CPU cpu;
    private HardDisk hardDisk;
    public void setCPU(CPU cpu) {
        this.cpu = cpu;
    }
    public void setHardDisk(HardDisk hardDisk) {
        this.hardDisk = hardDisk;
    }
    public void show() {
        System.out.println("CPU速度: " + cpu.getSpeed() + " Hz");
        System.out.println("硬盘内存: " + hardDisk.getCapacity() + " GB");
    }
}